Bug 1184186 - Convert robocop testMigrateUI to mochitest-chrome; r=margaret
authorGeoff Brown <gbrown@mozilla.com>
Thu, 06 Aug 2015 07:27:47 -0600
changeset 288184 c87adb72050b7eb63810df50d457607ab4e7c329
parent 288183 a252287c186c97395bd54d5f12e54857b7ecb30f
child 288185 5a057086c77d3aaf28dafe8f4f4696abdba1fce4
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs1184186
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1184186 - Convert robocop testMigrateUI to mochitest-chrome; r=margaret
mobile/android/tests/browser/chrome/chrome.ini
mobile/android/tests/browser/chrome/test_migrate_ui.html
mobile/android/tests/browser/robocop/robocop.ini
mobile/android/tests/browser/robocop/testMigrateUI.java
mobile/android/tests/browser/robocop/testMigrateUI.js
--- a/mobile/android/tests/browser/chrome/chrome.ini
+++ b/mobile/android/tests/browser/chrome/chrome.ini
@@ -9,9 +9,10 @@ support-files =
 [test_android_log.html]
 [test_app_constants.html]
 [test_debugger_server.html]
 [test_desktop_useragent.html]
 [test_device_search_engine.html]
 [test_home_provider.html]
 [test_java_addons.html]
 [test_jni.html]
+[test_migrate_ui.html]
 [test_resource_substitutions.html]
new file mode 100644
--- /dev/null
+++ b/mobile/android/tests/browser/chrome/test_migrate_ui.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=1154504
+Migrated from Robocop: https://bugzilla.mozilla.org/show_bug.cgi?id=1184186
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test for Bug 1154504</title>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://global/skin"/>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+  <script type="application/javascript;version=1.7">
+
+  Components.utils.import("resource://gre/modules/Services.jsm");
+
+  Services.prefs.clearUserPref("browser.migration.version");
+  Services.prefs.setBoolPref("nglayout.debug.paint_flashing", true);
+
+  let BrowserApp = Services.wm.getMostRecentWindow("navigator:browser").BrowserApp;
+  BrowserApp._migrateUI();
+
+  // Check that migration version increased.
+  is(Services.prefs.getIntPref("browser.migration.version"), 1, "found expected version");
+
+  // Check that user pref value was reset.
+  is(Services.prefs.prefHasUserValue("nglayout.debug.paint_flashing"), false, "found expected user value");
+
+  </script>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1154504">Mozilla Bug 1154504</a>
+<br>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1184186">Migrated from Robocop testMigrateUI</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+
+</div>
+<pre id="test">
+</pre>
+</body>
+</html>
--- a/mobile/android/tests/browser/robocop/robocop.ini
+++ b/mobile/android/tests/browser/robocop/robocop.ini
@@ -112,17 +112,16 @@ skip-if = android_version == "10" || and
 [testBrowserDiscovery.java]
 # disabled on 4.3, bug 1158384
 skip-if = android_version == "18"
 [testFilePicker.java]
 [testHistoryService.java]
 # disabled on 4.3, bug 1116036
 skip-if = android_version == "18"
 # [testMozPay.java] # see bug 945675
-[testMigrateUI.java]
 [testNetworkManager.java]
 [testOfflinePage.java]
 [testOrderedBroadcast.java]
 [testOSLocale.java]
 # disabled on 2.3 and 4.3: Bug 1124494
 skip-if = android_version == "10" || android_version == "18"
 [testReaderView.java]
 [testReadingListCache.java]
deleted file mode 100644
--- a/mobile/android/tests/browser/robocop/testMigrateUI.java
+++ /dev/null
@@ -1,11 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.gecko.tests;
-
-public class testMigrateUI extends JavascriptTest {
-    public testMigrateUI() {
-        super("testMigrateUI.js");
-    }
-}
deleted file mode 100644
--- a/mobile/android/tests/browser/robocop/testMigrateUI.js
+++ /dev/null
@@ -1,22 +0,0 @@
-// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-add_task(function* test_migrateUI() {
-  Services.prefs.clearUserPref("browser.migration.version");
-  Services.prefs.setBoolPref("nglayout.debug.paint_flashing", true);
-
-  let BrowserApp = Services.wm.getMostRecentWindow("navigator:browser").BrowserApp;
-  BrowserApp._migrateUI();
-
-  // Check that migration version increased.
-  do_check_eq(Services.prefs.getIntPref("browser.migration.version"), 1);
-
-  // Check that user pref value was reset.
-  do_check_eq(Services.prefs.prefHasUserValue("nglayout.debug.paint_flashing"), false);
-});
-
-run_next_test();