Update trunk, v2 and macos_sdk to 01c217ecc9d17f6e2d35300525605d53a750cda0. Unbundle packages.

Additional manual changes:

  - Enabled null safety for several unbundled packages in third_party/dart
    and for bundled third_party/pkg/pool in v2 and trunk
  - Patched https://dart-review.googlesource.com/c/sdk/+/155440
  - Disabled dead_code finding for sass and flutter_gallery
  - Fixed fuchsia timezone-related dependencies
  - Increased js size for hacker_news_pwa Angular example
  - Fixed dead_code error in dart2js_analysis_server
  - Ignored dead_code error in third_party/dart/webdriver/lib/support/stdio_stepper.dart
  - Fixed //javatests/com/google/dart/debugging tests

External changes:

  - 01c217ecc9d17f6e2d35300525605d53a750cda0 Analyzer: Move tests for 5 codes to diagnostics/ by Sam Rawlins <srawlins@google.com>
  - 1a829bbde0697b8494c1d1a86753d2291d07d07d Analyzer: Recategorize COULD_NOT_INFER as CompileTimeErro... by Sam Rawlins <srawlins@google.com>
  - 70aa3ac534293c439218e44914a32b5ca2f3c4c0 Update verify_diagnostics_test after moving to CompileTim... by Konstantin Shcheglov <scheglov@google.com>
  - ba92b78acd14e6cbe99b417e559a50660aecca7f Move errors from StaticWarningCode to CompileTimeErrorCode. by Konstantin Shcheglov <scheglov@google.com>
  - 0fcd35f653bf8d5c01585ef5cd4125d5c2573617 Use Scope lookup directly in ReferenceResolver. by Konstantin Shcheglov <scheglov@google.com>
  - 4de9f9f75a2bf0ad5c21eb00ea5bd4274680c587 Sort error / hint codes. by Konstantin Shcheglov <scheglov@google.com>
  - 8745cd5323a7f964af48524177c7b51a9a245c4d Use new Scope directly to simplify TypeNameResolver. by Konstantin Shcheglov <scheglov@google.com>
  - 9e1b6030d23ae6d7a43650803376b0f2a41ec6e4 Fix a type cast exception in the create-constructor fix (... by Brian Wilkerson <brianwilkerson@google.com>
  - bf411fcc107b1f32e179e1617806ff49c768e3a3 Prepare to publish analyzer 0.39.15. by Konstantin Shcheglov <scheglov@google.com>
  - 73748636ab7ce407c20d5de966c865a7af82bc05 [dart2js] Canonicalize empty collections in FunctionType by Stephen Adams <sra@google.com>
  - b4943094f0d2dd34dfef1e4e4ec9cb6669c3a9c7 [ VM / DartDev ] Spawn DartDev isolate with flags matchin... by Ben Konyi <bkonyi@google.com>
  - 8d8dbfcea24f020a06c0127f20a83affc6f4638a Add @override bulk-fix by pq <pquitslund@google.com>
  - 6fc6c476b002cabefd574de00fb5a8c3f9e9d414 Updates for typed literals resolution tests. by Konstantin Shcheglov <scheglov@google.com>
  - f4053e3811f2892cb8d68eee60ab5979a3afa49f [dart2js] Use Maplet in deferred_Load by Stephen Adams <sra@google.com>
  - ac71a391a385f260906740588fc99759a43817ff Add TypeSystemImpl.futureOrBase (), stop using iterable/m... by Konstantin Shcheglov <scheglov@google.com>
  - a4baaa3ac5e1615db1184bd3d219682f7829a130 Fix a bug in the way RangeFactory deals with trailing com... by Brian Wilkerson <brianwilkerson@google.com>
  - b61e229a6db9ae3bf35f2258dfe72affeef8377c Issue 41065. Remove unnecessary null workaround. by Konstantin Shcheglov <scheglov@google.com>
  - 9282f1b14a82879fb49aad8dd8c98b17e26c41f6 Fix for invalid implicit downcast in InterfaceType.allSup... by Konstantin Shcheglov <scheglov@google.com>
  - 4fcd77cbf3a6f39b4c811bdffc7ee9d6d3d2f666 [dart2js] Ensure setter Invocation names end with "=". by Mayank Patke <fishythefish@google.com>
  - 8c1829e11001d0f88b3138b904053e3702f0c8a2 bulk fix protocol wiring by pq <pquitslund@google.com>
  - f169b5729389d062bc94848e3eeca78f6c7cff99 [vm] Avoid eager creation of patch classes array in kerne... by Martin Kustermann <kustermann@google.com>
  - c65b444145cca1f67afa3e3b3f0708c4f14551f9 Analyzer: Move TOP_LEVEL_CYCLE to be a compile-time error by Sam Rawlins <srawlins@google.com>
  - afee49e7c1b76053d8203b2231db5c136a725db5 Add a default clientID when running in LSP mode by Danny Tuppeny <danny@tuppeny.com>
  - 8c70a6004d7749f172f2c6276e0407dc8e29e0bc Add tests for inconsistent language markers in part files. by Lasse Reichstein Holst Nielsen <lrn@google.com>
  - 37c8c709bfed93fb05a175aa4728e7b1d018143d Move `BytesBuilder` class and implementation to `dart:typ... by Johnni Winther <johnniwinther@google.com>
  - 7e8348f4ce87f89235154e974c799de57473c4f4 [dart2js] Assume `isPotentialSubtype` is always true. by Mayank Patke <fishythefish@google.com>
  - 5671730c5ae2e08bf8c0d63bb076fec1930ce868 [dart2js] Pass type arguments to callable properties even... by Mayank Patke <fishythefish@google.com>
  - 4c74ebb3676d3b4a31b3f896ad9236af44dcbebc [benchmark] Add dartdevc-null targets. by Jonas Termansen <sortie@google.com>
  - 56708696a9e9124c42f06c64ac49600b2e17c221 [vm/nnbd/bytecode] Distinguish function types with differ... by Alexander Markov <alexmarkov@google.com>
  - d2f7039e9caddf8f041776d5eadedb34892c7865 [dart:io] Parse scoped IPv6 in constructor of InternetAdd... by Zichang Guo <zichangguo@google.com>
  - c2d28d1569a597e4c2c70b4beb9dc851cce9b404 Rename Null Safety tests. by Konstantin Shcheglov <scheglov@google.com>
  - 4d3ec06277042a84344f74cc260cd58784f6c41f Add more data and performance operations for Cider. by Konstantin Shcheglov <scheglov@google.com>
  - 3103d859e4a38417ed15955542c2f4cb3dc661a6 Remove unused TypeSystemImpl.mostSpecificTypeArgument(). by Konstantin Shcheglov <scheglov@google.com>
  - 6d9a4f16ddc792fa39d2d942e8b1d2c2c1c1a29e Issue 42757. Implement null spread element typing with nu... by Konstantin Shcheglov <scheglov@google.com>
  - 8c316a99de401a63a7818ff1552527ec5662dcf4 Remove unnecessary null checks. by Konstantin Shcheglov <scheglov@google.com>
  - 6c9b885e57ee5a52013c07e2af458ab58405198b Remove StrongModeCode.INVALID_PARAMETER_DECLARATION; it's... by Sam Rawlins <srawlins@google.com>
  - b98eb386eae5998eafbf674f307267738b8a2214 [ddc] Use prebuilt_dart_action to build js by Nicholas Shahan <nshahan@google.com>
  - 8796382840ddd440db9d1815c4ac83ffb26f1d2d Analyzer: Move invalid_super_invocation to compile-time e... by Sam Rawlins <srawlins@google.com>
  - cece303eb4decfd7c06cf3987ea3b5a909390062 Check diagnostics in List/Map/SetLiteralTest(s). by Konstantin Shcheglov <scheglov@google.com>
  - cc519b9a0366ae8e49bf78a15c73545ec0d3cfd9 Test that during partial resolution for Cider we don't re... by Konstantin Shcheglov <scheglov@google.com>
  - 4ea6d6e13067489ff8fd03235e48ecd4aac4b427 [tests/ffi] Re-enable commented out tests by Daco Harkes <dacoharkes@google.com>
  - 2225b6f472c5471f60ad8daf614a1d3966372b0a Migration: fix handling of async functions that return Fu... by Paul Berry <paulberry@google.com>
  - f907e561c9fcbdd16f08a3e9fd459c9da3b262c8 Migration: never produce a type of the form `FutureOr<T?>... by Paul Berry <paulberry@google.com>
  - 69ba6e5f80e25cea566f6eb0dfb1c81e9ec78980 Make FileSystemEntity.absolutePath understand more Window... by Lasse Reichstein Holst Nielsen <lrn@google.com>
  - 202e32afebce3226879c0ab9920ced365847d79d [vm] Native API: Introduce Dart_FinalizableHandle by Daco Harkes <dacoharkes@google.com>
  - debb4dddea5cd13e7a0a4cdda0bf1fb5027e990d [co19] Language/Types and Language/Variables tests enabled by sgrekhov <sgrekhov@unipro.ru>
  - 36614642973dd0fa7594839fdb42d50ae6663e34 [infra] Update checked-in SDKs to 2.10.0-0.0.dev by William Hesse <whesse@google.com>
  - b8dc7627a97de2ce0dbc5e460d9d0a75c2c721f0 [cfe] Handle NullCheck in constant evaluation by Johnni Winther <johnniwinther@google.com>
  - 40fd1c456e0a872ab8f6d2a018b3436d2f7a5f84 Revert "[dart:io] Add Abort() on HttpClientRequest" by Zichang Guo <zichangguo@google.com>
  - 17d7296a4242958feaf7f7203c9258e97b4b513f [vm/nnbd/bytecode] Fix reuse of type arguments in bytecode by Alexander Markov <alexmarkov@google.com>
  - 58b6f40c739c0c215ebbd0d1fbe6c4261433cafb Issue 42797. Understand in legacy libraries that a functi... by Konstantin Shcheglov <scheglov@google.com>
  - fc8a6d9f9bdb7906fde5c268841afed4406e2e7f [VM/compiler] Dereference TypeRef literal when propagatin... by Regis Crelier <regis@google.com>
  - 0689ec527a779b13517dd7bed98e855a4e1ca658 Move "test.dart" (well, most of its contents) into pkg/te... by Robert Nystrom <rnystrom@google.com>
  - 1094b3c61d51d6d64a12079f64bdaa1c9672bf5c Prepare static error test updater tool to handle web tests. by Robert Nystrom <rnystrom@google.com>
  - b258585f2f6b819b892529eb0e9f1ca0381c22c5 [observatory] Migrate from deprecated isInstanceOf to isA. by Ryan Macnak <rmacnak@google.com>
  - dfe1d9b682afc710744f3f7c7b15af97d5bd5d47 Disable OverrideContributor for Cider. by Konstantin Shcheglov <scheglov@google.com>
  - aea99b2f5cef1886d7079790a0046bfe3a8a01be scope debug property assist to Diagnosticables by pq <pquitslund@google.com>
  - 4b96f20a79a6eca074dc17b8b84448f79d4acfc8 [dart:io] Add Abort() on HttpClientRequest by Zichang Guo <zichangguo@google.com>
  - 1b1a39708cf1bfbd85c8de9c13912338c5fd50be [build] Use frameworks instead of libs by Roland McGrath <mcgrathr@google.com>
  - 3fef522496001b50a49b68bfe488d474206192f8 Revert "Reland "[vm] Replaces fuchsia.deprecatedtimezone"" by Filip Filmar <fmil@google.com>
  - 8c664d4f3fa982dacca6112fa05f46e6280bca89 Revert "Issue 42797. Understand in legacy libraries that ... by Konstantin Shcheglov <scheglov@google.com>
  - 2efb5bebc7d71df19558611e22565912401dbb66 [ dart:_http ] Fix typo in HTTP response timeline event by Ben Konyi <bkonyi@google.com>
  - 0884dae36cca1bd7669e5941d95a44f891d7aeb9 Revert "Fix the #include path for ICU headers" by Filip Filmar <fmil@google.com>
  - 5171534e815547397be1ac3c2fae60ea32749553 Scope tweaks. Report REFERENCED_BEFORE_DECLARATION in mor... by Konstantin Shcheglov <scheglov@google.com>
  - 6bba75079a1f7166c00ad250a6de6fc3aaff9b17 Issue 42797. Understand in legacy libraries that a functi... by Konstantin Shcheglov <scheglov@google.com>
  - b4ebbb7f5c0bcaab4f154e4bbbe414b463a2ee22 [build] Update gn to match Fuchsia by Roland McGrath <mcgrathr@google.com>
  - cb428a7a0210b5dd89b29a0f5c381ef38b630e47 [dart2js] Remove old bug work around in collector. by Joshua Litt <joshualitt@google.com>
  - 08663c20aba7f985bd839c330bd05bb1cff15196 Change flutter patch to match existing DEPS on master bra... by William Hesse <whesse@google.com>
  - 146ad014d9277ee6b7bc008002867ed7f1f24b49 update js/meta for the 2.10 dev sdk by Jacob MacDonald <jakemac@google.com>
  - 488c7187936bd05726cdd0a9effae154663d6c00 [co19] Roll co19 to d79951e06e443213243e54c2c32694b79a221... by William Hesse <whesse@google.com>
  - ba20edd7bef6dec010cd4fa064adfeba86b3c7df Add patch for flutter-engine when changing to version 2.10 by William Hesse <whesse@google.com>
  - 24c7666def53832a31559beac130eb3336008110 Update tests that have the current version number hardcoded by William Hesse <whesse@google.com>
  - f88ce7aef5f8a41fddfab8e26f8b2c6e0e950236 Increase Dart version to 2.10 by William Hesse <whesse@google.com>
  - a3815b659047cfc6b63d41d180aa1ca1b781ee68 [ VM ] Fix issue where ExitCodeHandlerEntry could get stu... by Ben Konyi <bkonyi@google.com>
  - 6f8ce20c993fe1c9f7f1171a4de80d00350d5cf4 Move asInstanceOf(ClassElement) to DartType. by Konstantin Shcheglov <scheglov@google.com>
  - 041e0dd618b6fcabe59e8beaff23b03ae3abecb9 Analyzer: Enforce strict-inference by Sam Rawlins <srawlins@google.com>
  - 23cf1230d0b94df0b77ca0a726b4ec90129588a5 Analyzer: Re-categorize StrongModeCode.INVALID_CAST_* cod... by Sam Rawlins <srawlins@google.com>

PiperOrigin-RevId: 323531102
1 file changed
tree: 1407144e69e58932b4b4bc2bb78dc6c09d9b218d
  1. lib/
  2. test/
  3. tool/
  4. .gitignore
  5. .travis.yml
  6. analysis_options.yaml
  7. AUTHORS
  8. CHANGELOG.md
  9. CONTRIBUTING.md
  10. LICENSE
  11. pubspec.yaml
  12. README.md
README.md

webdriver

Build Status pub package

Provides WebDriver bindings for Dart. These use the WebDriver JSON interface, and as such, require the use of the WebDriver remote server.

Installing

  1. Depend on it

    Add this to your package's pubspec.yaml file:

    dependencies:
      webdriver: any
    

    If your package is an application package you should use any as the version constraint.

  2. Install it

    If you're using IntelliJ, choose:

    Control + Shift + A > Pub: Get Dependencies
    

    If you're using the Dart Editor, choose:

    Menu > Tools > Pub Install
    

    Or if you want to install from the command line, run:

    $ pub install
    
  3. Import it

    Now in your Dart code, you can use:

    import 'package:webdriver/io.dart';
    
    WebDriver driver = createDriver(...);
    

    This will use by default the asynchronous, JSON wire spec implementation. You now can also use a synchronous version of WebDriver:


    import 'package:webdriver/sync_io.dart'; final driver = createDriver(...);

    This version of WebDriver supports both the JSON wire spec and W3C spec, allowing use with modern versions of Firefox. This defaults to the JSON wire spec, but can also be configured to use the W3C spec or even to try and automatically infer the spec during session creation:

     final w3cDriver = createDriver(spec: WebDriverSpec.W3c);  // Use W3C spec.
    
     final anyDriver = createDriver(spec: WebDriverSpec.Auto); // Infer spec.
    

Testing

Unfortunately using bazel with Dart libraries and Dart WebDriver is not yet supported. We hope to add this at some point, but for now pub still works.

As a consequence, running tests is a bit more complicated than we'd like:

  1. Launch a WebDriver binar(ies).

    First, bring up chromedriver / geckodriver. Other conforming WebDriver binaries should work as well, but we test against these:

    chromedriver --port=4444 --url-base=wd/hub --verbose
    geckodriver --port=4445
    

    ChromeDriver is used to test our JSON wire spec implementation, and geckodriver is used to test our W3C spec implementation.

    Synchronous tests are labeled as Chrome/Firefox. All async tests run exclusively against Chrome (as async, like ChromeDriver supports only the old JSON wire spec).

  2. Run a test. All files suffixed with ‘_test.dart’ are tests.

    pub run test/path/to/test.dart -r expanded -p vm
    

    Or to run all tests:

    pub run test -r expanded -p vm
    

    You should probably go get a coffee or something, this is gonna take awhile.