From 033f595342dd66fc501db3d4be335dec840253d5 Mon Sep 17 00:00:00 2001 From: Vedant Chakravadhanula Date: Fri, 26 Jan 2018 01:43:11 +0530 Subject: [PATCH] Bug 1423661 - Added data url to replace blob-download.html. r=whimboo MozReview-Commit-ID: I5rsLqzia3w --HG-- extra : rebase_source : ca896d82f60ea3cd92c4e476ad3c5c9bbcc6c32f --- .../tests/unit/test_window_handles_content.py | 17 ++++++++++++++++- .../marionette_harness/www/blob_download.html | 11 ----------- 2 files changed, 16 insertions(+), 12 deletions(-) delete mode 100644 testing/marionette/harness/marionette_harness/www/blob_download.html diff --git a/testing/marionette/harness/marionette_harness/tests/unit/test_window_handles_content.py b/testing/marionette/harness/marionette_harness/tests/unit/test_window_handles_content.py index fbf9de4f3dce..2a19bdb82fa8 100644 --- a/testing/marionette/harness/marionette_harness/tests/unit/test_window_handles_content.py +++ b/testing/marionette/harness/marionette_harness/tests/unit/test_window_handles_content.py @@ -5,12 +5,17 @@ from __future__ import absolute_import import types +import urllib from marionette_driver import By, errors, Wait from marionette_harness import MarionetteTestCase, skip_if_mobile, WindowManagerMixin +def inline(doc): + return "data:text/html;charset=utf-8,{}".format(urllib.quote(doc)) + + class TestWindowHandles(WindowManagerMixin, MarionetteTestCase): def setUp(self): @@ -101,7 +106,17 @@ class TestWindowHandles(WindowManagerMixin, MarionetteTestCase): @skip_if_mobile("Fennec doesn't support other chrome windows") def test_window_handles_after_opening_new_non_browser_window(self): def open_with_link(): - self.marionette.navigate(self.marionette.absolute_url("blob_download.html")) + self.marionette.navigate(inline(""" + Download + + + """)) link = self.marionette.find_element(By.ID, "blob-download") link.click() diff --git a/testing/marionette/harness/marionette_harness/www/blob_download.html b/testing/marionette/harness/marionette_harness/www/blob_download.html deleted file mode 100644 index 7c9419c1c1c2..000000000000 --- a/testing/marionette/harness/marionette_harness/www/blob_download.html +++ /dev/null @@ -1,11 +0,0 @@ - - -Download - -