Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@JS()
library navigator.dart;
library navigator;

import 'package:js/js.dart';
import 'package:meta/meta.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'dart:html' as html;
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
import 'package:meta/meta.dart';
import 'package:url_launcher_platform_interface/url_launcher_platform_interface.dart';
import 'navigator.dart' as navigator;
import 'src/navigator.dart' as navigator;

/// The web implementation of [UrlLauncherPlatform].
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'dart:html' as html;
import 'package:flutter_test/flutter_test.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:url_launcher_web/url_launcher_web.dart';
import 'package:url_launcher_web/navigator.dart' as navigator;
import 'package:url_launcher_web/src/navigator.dart' as navigator;
import 'package:url_launcher_platform_interface/url_launcher_platform_interface.dart';

void main() {
Expand Down Expand Up @@ -55,6 +55,7 @@ void main() {
});

test('the window that is launched is in the same window', () {
final originalStandalone = navigator.standalone;
// Simulate the navigator is in standalone mode on iOS devices.
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator
navigator.standalone = true;
Expand All @@ -63,6 +64,7 @@ void main() {
urlLauncherPlugin.openNewWindow('https://www.google.com');
expect(window, isNotNull);
expect(window.opener, isNot(equals(html.window)));
navigator.standalone = originalStandalone;
});

test('does not implement closeWebView()', () {
Expand Down