Skip to content

Commit 89492da

Browse files
authored
fix: change some int types to double (microsoft#200)
1 parent 01d7eac commit 89492da

File tree

22 files changed

+269
-290
lines changed

22 files changed

+269
-290
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ jobs:
2626
path: ~/.m2
2727
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
2828
restore-keys: ${{ runner.os }}-m2
29-
# - name: Cache Downloaded Drivers
30-
# uses: actions/cache@v2
31-
# with:
32-
# path: driver-bundle/src/main/resources/driver
33-
# key: ${{ runner.os }}-drivers-${{ hashFiles('scripts/*') }}
34-
# restore-keys: ${{ runner.os }}-drivers
3529
- name: Download drivers
3630
shell: bash
3731
run: scripts/download_driver_for_all_platforms.sh

playwright/src/main/java/com/microsoft/playwright/Accessibility.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class SnapshotOptions {
5050
*/
5151
public ElementHandle root;
5252

53-
public SnapshotOptions withInterestingOnly(Boolean interestingOnly) {
53+
public SnapshotOptions withInterestingOnly(boolean interestingOnly) {
5454
this.interestingOnly = interestingOnly;
5555
return this;
5656
}

playwright/src/main/java/com/microsoft/playwright/Browser.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public NewContextOptions done() {
118118
return NewContextOptions.this;
119119
}
120120

121-
public RecordHar withOmitContent(Boolean omitContent) {
121+
public RecordHar withOmitContent(boolean omitContent) {
122122
this.omitContent = omitContent;
123123
return this;
124124
}
@@ -249,19 +249,19 @@ public RecordVideo withSize(int width, int height) {
249249
*/
250250
public Page.Viewport viewport;
251251

252-
public NewContextOptions withAcceptDownloads(Boolean acceptDownloads) {
252+
public NewContextOptions withAcceptDownloads(boolean acceptDownloads) {
253253
this.acceptDownloads = acceptDownloads;
254254
return this;
255255
}
256-
public NewContextOptions withBypassCSP(Boolean bypassCSP) {
256+
public NewContextOptions withBypassCSP(boolean bypassCSP) {
257257
this.bypassCSP = bypassCSP;
258258
return this;
259259
}
260260
public NewContextOptions withColorScheme(ColorScheme colorScheme) {
261261
this.colorScheme = colorScheme;
262262
return this;
263263
}
264-
public NewContextOptions withDeviceScaleFactor(Double deviceScaleFactor) {
264+
public NewContextOptions withDeviceScaleFactor(double deviceScaleFactor) {
265265
this.deviceScaleFactor = deviceScaleFactor;
266266
return this;
267267
}
@@ -273,31 +273,31 @@ public NewContextOptions withGeolocation(Geolocation geolocation) {
273273
this.geolocation = geolocation;
274274
return this;
275275
}
276-
public NewContextOptions withHasTouch(Boolean hasTouch) {
276+
public NewContextOptions withHasTouch(boolean hasTouch) {
277277
this.hasTouch = hasTouch;
278278
return this;
279279
}
280280
public NewContextOptions withHttpCredentials(String username, String password) {
281281
this.httpCredentials = new BrowserContext.HTTPCredentials(username, password);
282282
return this;
283283
}
284-
public NewContextOptions withIgnoreHTTPSErrors(Boolean ignoreHTTPSErrors) {
284+
public NewContextOptions withIgnoreHTTPSErrors(boolean ignoreHTTPSErrors) {
285285
this.ignoreHTTPSErrors = ignoreHTTPSErrors;
286286
return this;
287287
}
288-
public NewContextOptions withIsMobile(Boolean isMobile) {
288+
public NewContextOptions withIsMobile(boolean isMobile) {
289289
this.isMobile = isMobile;
290290
return this;
291291
}
292-
public NewContextOptions withJavaScriptEnabled(Boolean javaScriptEnabled) {
292+
public NewContextOptions withJavaScriptEnabled(boolean javaScriptEnabled) {
293293
this.javaScriptEnabled = javaScriptEnabled;
294294
return this;
295295
}
296296
public NewContextOptions withLocale(String locale) {
297297
this.locale = locale;
298298
return this;
299299
}
300-
public NewContextOptions withOffline(Boolean offline) {
300+
public NewContextOptions withOffline(boolean offline) {
301301
this.offline = offline;
302302
return this;
303303
}
@@ -407,7 +407,7 @@ public NewPageOptions done() {
407407
return NewPageOptions.this;
408408
}
409409

410-
public RecordHar withOmitContent(Boolean omitContent) {
410+
public RecordHar withOmitContent(boolean omitContent) {
411411
this.omitContent = omitContent;
412412
return this;
413413
}
@@ -538,19 +538,19 @@ public RecordVideo withSize(int width, int height) {
538538
*/
539539
public Page.Viewport viewport;
540540

541-
public NewPageOptions withAcceptDownloads(Boolean acceptDownloads) {
541+
public NewPageOptions withAcceptDownloads(boolean acceptDownloads) {
542542
this.acceptDownloads = acceptDownloads;
543543
return this;
544544
}
545-
public NewPageOptions withBypassCSP(Boolean bypassCSP) {
545+
public NewPageOptions withBypassCSP(boolean bypassCSP) {
546546
this.bypassCSP = bypassCSP;
547547
return this;
548548
}
549549
public NewPageOptions withColorScheme(ColorScheme colorScheme) {
550550
this.colorScheme = colorScheme;
551551
return this;
552552
}
553-
public NewPageOptions withDeviceScaleFactor(Double deviceScaleFactor) {
553+
public NewPageOptions withDeviceScaleFactor(double deviceScaleFactor) {
554554
this.deviceScaleFactor = deviceScaleFactor;
555555
return this;
556556
}
@@ -562,31 +562,31 @@ public NewPageOptions withGeolocation(Geolocation geolocation) {
562562
this.geolocation = geolocation;
563563
return this;
564564
}
565-
public NewPageOptions withHasTouch(Boolean hasTouch) {
565+
public NewPageOptions withHasTouch(boolean hasTouch) {
566566
this.hasTouch = hasTouch;
567567
return this;
568568
}
569569
public NewPageOptions withHttpCredentials(String username, String password) {
570570
this.httpCredentials = new BrowserContext.HTTPCredentials(username, password);
571571
return this;
572572
}
573-
public NewPageOptions withIgnoreHTTPSErrors(Boolean ignoreHTTPSErrors) {
573+
public NewPageOptions withIgnoreHTTPSErrors(boolean ignoreHTTPSErrors) {
574574
this.ignoreHTTPSErrors = ignoreHTTPSErrors;
575575
return this;
576576
}
577-
public NewPageOptions withIsMobile(Boolean isMobile) {
577+
public NewPageOptions withIsMobile(boolean isMobile) {
578578
this.isMobile = isMobile;
579579
return this;
580580
}
581-
public NewPageOptions withJavaScriptEnabled(Boolean javaScriptEnabled) {
581+
public NewPageOptions withJavaScriptEnabled(boolean javaScriptEnabled) {
582582
this.javaScriptEnabled = javaScriptEnabled;
583583
return this;
584584
}
585585
public NewPageOptions withLocale(String locale) {
586586
this.locale = locale;
587587
return this;
588588
}
589-
public NewPageOptions withOffline(Boolean offline) {
589+
public NewPageOptions withOffline(boolean offline) {
590590
this.offline = offline;
591591
return this;
592592
}

playwright/src/main/java/com/microsoft/playwright/BrowserContext.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ public List<OriginState> origins() {
100100
}
101101

102102
class FutureEventOptions {
103-
public Integer timeout;
103+
public Double timeout;
104104
public Predicate<Event<EventType>> predicate;
105-
public FutureEventOptions withTimeout(int millis) {
105+
public FutureEventOptions withTimeout(double millis) {
106106
timeout = millis;
107107
return this;
108108
}
@@ -181,11 +181,11 @@ public AddCookie withExpires(Long expires) {
181181
this.expires = expires;
182182
return this;
183183
}
184-
public AddCookie withHttpOnly(Boolean httpOnly) {
184+
public AddCookie withHttpOnly(boolean httpOnly) {
185185
this.httpOnly = httpOnly;
186186
return this;
187187
}
188-
public AddCookie withSecure(Boolean secure) {
188+
public AddCookie withSecure(boolean secure) {
189189
this.secure = secure;
190190
return this;
191191
}
@@ -239,7 +239,7 @@ class ExposeBindingOptions {
239239
*/
240240
public Boolean handle;
241241

242-
public ExposeBindingOptions withHandle(Boolean handle) {
242+
public ExposeBindingOptions withHandle(boolean handle) {
243243
this.handle = handle;
244244
return this;
245245
}
@@ -453,7 +453,7 @@ default void grantPermissions(List<String> permissions) {
453453
* [{@code method: BrowserContext.setDefaultNavigationTimeout}].
454454
* @param timeout Maximum navigation time in milliseconds
455455
*/
456-
void setDefaultNavigationTimeout(int timeout);
456+
void setDefaultNavigationTimeout(double timeout);
457457
/**
458458
* This setting will change the default maximum time for all the methods accepting {@code timeout} option.
459459
* <p>
@@ -462,7 +462,7 @@ default void grantPermissions(List<String> permissions) {
462462
* [{@code method: BrowserContext.setDefaultNavigationTimeout}] take priority over [{@code method: BrowserContext.setDefaultTimeout}].
463463
* @param timeout Maximum time in milliseconds
464464
*/
465-
void setDefaultTimeout(int timeout);
465+
void setDefaultTimeout(double timeout);
466466
/**
467467
* The extra HTTP headers will be sent with every request initiated by any page in the context. These headers are merged
468468
* <p>

playwright/src/main/java/com/microsoft/playwright/BrowserType.java

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,11 @@ public LaunchOptions withArgs(List<String> args) {
148148
this.args = args;
149149
return this;
150150
}
151-
public LaunchOptions withChromiumSandbox(Boolean chromiumSandbox) {
151+
public LaunchOptions withChromiumSandbox(boolean chromiumSandbox) {
152152
this.chromiumSandbox = chromiumSandbox;
153153
return this;
154154
}
155-
public LaunchOptions withDevtools(Boolean devtools) {
155+
public LaunchOptions withDevtools(boolean devtools) {
156156
this.devtools = devtools;
157157
return this;
158158
}
@@ -172,19 +172,19 @@ public LaunchOptions withFirefoxUserPrefs(Map<String, Object> firefoxUserPrefs)
172172
this.firefoxUserPrefs = firefoxUserPrefs;
173173
return this;
174174
}
175-
public LaunchOptions withHandleSIGHUP(Boolean handleSIGHUP) {
175+
public LaunchOptions withHandleSIGHUP(boolean handleSIGHUP) {
176176
this.handleSIGHUP = handleSIGHUP;
177177
return this;
178178
}
179-
public LaunchOptions withHandleSIGINT(Boolean handleSIGINT) {
179+
public LaunchOptions withHandleSIGINT(boolean handleSIGINT) {
180180
this.handleSIGINT = handleSIGINT;
181181
return this;
182182
}
183-
public LaunchOptions withHandleSIGTERM(Boolean handleSIGTERM) {
183+
public LaunchOptions withHandleSIGTERM(boolean handleSIGTERM) {
184184
this.handleSIGTERM = handleSIGTERM;
185185
return this;
186186
}
187-
public LaunchOptions withHeadless(Boolean headless) {
187+
public LaunchOptions withHeadless(boolean headless) {
188188
this.headless = headless;
189189
return this;
190190
}
@@ -200,11 +200,11 @@ public Proxy setProxy() {
200200
this.proxy = new Proxy();
201201
return this.proxy;
202202
}
203-
public LaunchOptions withSlowMo(Double slowMo) {
203+
public LaunchOptions withSlowMo(double slowMo) {
204204
this.slowMo = slowMo;
205205
return this;
206206
}
207-
public LaunchOptions withTimeout(Double timeout) {
207+
public LaunchOptions withTimeout(double timeout) {
208208
this.timeout = timeout;
209209
return this;
210210
}
@@ -268,7 +268,7 @@ public LaunchPersistentContextOptions done() {
268268
return LaunchPersistentContextOptions.this;
269269
}
270270

271-
public RecordHar withOmitContent(Boolean omitContent) {
271+
public RecordHar withOmitContent(boolean omitContent) {
272272
this.omitContent = omitContent;
273273
return this;
274274
}
@@ -479,31 +479,31 @@ public Size setSize() {
479479
*/
480480
public Page.Viewport viewport;
481481

482-
public LaunchPersistentContextOptions withAcceptDownloads(Boolean acceptDownloads) {
482+
public LaunchPersistentContextOptions withAcceptDownloads(boolean acceptDownloads) {
483483
this.acceptDownloads = acceptDownloads;
484484
return this;
485485
}
486486
public LaunchPersistentContextOptions withArgs(List<String> args) {
487487
this.args = args;
488488
return this;
489489
}
490-
public LaunchPersistentContextOptions withBypassCSP(Boolean bypassCSP) {
490+
public LaunchPersistentContextOptions withBypassCSP(boolean bypassCSP) {
491491
this.bypassCSP = bypassCSP;
492492
return this;
493493
}
494-
public LaunchPersistentContextOptions withChromiumSandbox(Boolean chromiumSandbox) {
494+
public LaunchPersistentContextOptions withChromiumSandbox(boolean chromiumSandbox) {
495495
this.chromiumSandbox = chromiumSandbox;
496496
return this;
497497
}
498498
public LaunchPersistentContextOptions withColorScheme(ColorScheme colorScheme) {
499499
this.colorScheme = colorScheme;
500500
return this;
501501
}
502-
public LaunchPersistentContextOptions withDeviceScaleFactor(Double deviceScaleFactor) {
502+
public LaunchPersistentContextOptions withDeviceScaleFactor(double deviceScaleFactor) {
503503
this.deviceScaleFactor = deviceScaleFactor;
504504
return this;
505505
}
506-
public LaunchPersistentContextOptions withDevtools(Boolean devtools) {
506+
public LaunchPersistentContextOptions withDevtools(boolean devtools) {
507507
this.devtools = devtools;
508508
return this;
509509
}
@@ -527,23 +527,23 @@ public LaunchPersistentContextOptions withGeolocation(Geolocation geolocation) {
527527
this.geolocation = geolocation;
528528
return this;
529529
}
530-
public LaunchPersistentContextOptions withHandleSIGHUP(Boolean handleSIGHUP) {
530+
public LaunchPersistentContextOptions withHandleSIGHUP(boolean handleSIGHUP) {
531531
this.handleSIGHUP = handleSIGHUP;
532532
return this;
533533
}
534-
public LaunchPersistentContextOptions withHandleSIGINT(Boolean handleSIGINT) {
534+
public LaunchPersistentContextOptions withHandleSIGINT(boolean handleSIGINT) {
535535
this.handleSIGINT = handleSIGINT;
536536
return this;
537537
}
538-
public LaunchPersistentContextOptions withHandleSIGTERM(Boolean handleSIGTERM) {
538+
public LaunchPersistentContextOptions withHandleSIGTERM(boolean handleSIGTERM) {
539539
this.handleSIGTERM = handleSIGTERM;
540540
return this;
541541
}
542-
public LaunchPersistentContextOptions withHasTouch(Boolean hasTouch) {
542+
public LaunchPersistentContextOptions withHasTouch(boolean hasTouch) {
543543
this.hasTouch = hasTouch;
544544
return this;
545545
}
546-
public LaunchPersistentContextOptions withHeadless(Boolean headless) {
546+
public LaunchPersistentContextOptions withHeadless(boolean headless) {
547547
this.headless = headless;
548548
return this;
549549
}
@@ -559,23 +559,23 @@ public LaunchPersistentContextOptions withIgnoreAllDefaultArgs(boolean ignore) {
559559
this.ignoreAllDefaultArgs = ignore;
560560
return this;
561561
}
562-
public LaunchPersistentContextOptions withIgnoreHTTPSErrors(Boolean ignoreHTTPSErrors) {
562+
public LaunchPersistentContextOptions withIgnoreHTTPSErrors(boolean ignoreHTTPSErrors) {
563563
this.ignoreHTTPSErrors = ignoreHTTPSErrors;
564564
return this;
565565
}
566-
public LaunchPersistentContextOptions withIsMobile(Boolean isMobile) {
566+
public LaunchPersistentContextOptions withIsMobile(boolean isMobile) {
567567
this.isMobile = isMobile;
568568
return this;
569569
}
570-
public LaunchPersistentContextOptions withJavaScriptEnabled(Boolean javaScriptEnabled) {
570+
public LaunchPersistentContextOptions withJavaScriptEnabled(boolean javaScriptEnabled) {
571571
this.javaScriptEnabled = javaScriptEnabled;
572572
return this;
573573
}
574574
public LaunchPersistentContextOptions withLocale(String locale) {
575575
this.locale = locale;
576576
return this;
577577
}
578-
public LaunchPersistentContextOptions withOffline(Boolean offline) {
578+
public LaunchPersistentContextOptions withOffline(boolean offline) {
579579
this.offline = offline;
580580
return this;
581581
}
@@ -595,11 +595,11 @@ public RecordVideo setRecordVideo() {
595595
this.recordVideo = new RecordVideo();
596596
return this.recordVideo;
597597
}
598-
public LaunchPersistentContextOptions withSlowMo(Double slowMo) {
598+
public LaunchPersistentContextOptions withSlowMo(double slowMo) {
599599
this.slowMo = slowMo;
600600
return this;
601601
}
602-
public LaunchPersistentContextOptions withTimeout(Double timeout) {
602+
public LaunchPersistentContextOptions withTimeout(double timeout) {
603603
this.timeout = timeout;
604604
return this;
605605
}

0 commit comments

Comments
 (0)