GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Unverified Commit 59b07f83 authored by boklm's avatar boklm
Browse files

Convert the acid3 test to marionette

parent cecf9b37
......@@ -260,7 +260,7 @@ our @tests = (
},
{
name => 'acid3',
type => 'mozmill',
type => 'marionette',
descr => 'acid3 tests',
use_net => 1,
retry => 4,
......
from marionette_driver import By, Wait
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
import testsuite
class Test(FirefoxTestCase):
def setUp(self):
FirefoxTestCase.setUp(self)
ts = testsuite.TestSuite()
self.test_page_url = '%s/acid3/' % ts.t['options']['test_data_url']
def test_acid3(self):
with self.marionette.using_context('content'):
self.marionette.navigate(self.test_page_url)
wait = Wait(self.marionette, timeout=500, interval=1)
wait.until(lambda m: m.find_element('id', 'score').text == '100',
message='acid3 not 100')
"use strict";
var {expect} = require("../mozilla-mozmill-tests/lib/assertions");
var screenshot = require("../lib/screenshot");
var testsuite = require("../lib/testsuite");
var setupModule = function(aModule) {
aModule.controller = mozmill.getBrowserController();
}
var testAcid3 = function() {
var acid_page = testsuite.options.test_data_url + '/acid3/';
controller.open(acid_page);
controller.waitForPageLoad();
controller.sleep(4000);
var result = new elementslib.ID(controller.window.document, "score");
result.waitForElement(5000, 100);
controller.waitFor(
function() {
var result = new elementslib.ID(controller.window.document, "score");
var result_text = result.getNode().innerHTML;
return result_text == "100";
},
"acid3 100", 50000, 100);
screenshot.create(controller, []);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment