Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Unified Diff: LayoutTests/inspector/geolocation-emulation/emulate-geolocation-invalid-params.html

Issue 172393006: LayoutTest emulating geolocation with inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update review comments Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/inspector/geolocation-emulation/emulate-geolocation-invalid-params.html
diff --git a/LayoutTests/inspector/geolocation-emulation/emulate-geolocation-invalid-params.html b/LayoutTests/inspector/geolocation-emulation/emulate-geolocation-invalid-params.html
deleted file mode 100644
index 10550400496be05bae64e000e3143e2b8a0296d2..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector/geolocation-emulation/emulate-geolocation-invalid-params.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<html>
-<head>
-<script src="../../http/tests/inspector/inspector-test.js"></script>
-<script>
-
-function testLocationMock()
-{
- function testSuccess(position)
- {
- if (position.message) console.log("Error " + position.message)
- else console.log("Latitude: " + position.coords.latitude + " Longitude: " + position.coords.longitude);
- }
-
- function testFailed()
- {
- console.log("Unexpected error occured. Test failed.");
- }
-
- var mockLatitude = 100;
- var mockLongitude = 200;
- var mockAccuracy = 94;
-
- internals.setGeolocationPosition(document, mockLatitude, mockLongitude, mockAccuracy);
- navigator.geolocation.getCurrentPosition(testSuccess, testFailed);
-}
-
-function setup()
-{
- if (window.internals) {
- internals.setGeolocationClientMock(document);
- internals.setGeolocationPermission(document, true);
- }
-}
-
-function test()
-{
- InspectorTest.runTestSuite([
- function setUp(next)
- {
- InspectorTest.evaluateInPage("setup()", next);
- },
-
- function setOverride(next)
- {
- InspectorTest.addConsoleSniffer(next);
- // Invalid position params
- GeolocationAgent.setGeolocationOverride(false, 0, 0);
- GeolocationAgent.setGeolocationOverride(0, null, 0);
- GeolocationAgent.setGeolocationOverride(0, 0, "test");
- InspectorTest.evaluateInPage("testLocationMock()", next);
- },
-
- function clearOverride(next)
- {
- GeolocationAgent.clearGeolocationOverride(next);
- }
- ]);
-}
-</script>
-</head>
-<body onload="runTest()">
-<p>
-Tests that geolocation emulation with latitude and longitude works as expected.
-</p>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698