mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 752319 - Use testharness.js for the cross-origin localStorage tests; r=mayhemer
This commit is contained in:
parent
b1c83bd74f
commit
a16e8f4659
@ -1,3 +1,5 @@
|
|||||||
|
var t = async_test(document.title);
|
||||||
|
|
||||||
var frameLoadsPending = 2;
|
var frameLoadsPending = 2;
|
||||||
|
|
||||||
var callMasterFrame = true;
|
var callMasterFrame = true;
|
||||||
@ -7,7 +9,6 @@ var masterFrameOrigin = "";
|
|||||||
var slaveFrameOrigin = "";
|
var slaveFrameOrigin = "";
|
||||||
|
|
||||||
var failureRegExp = new RegExp("^FAILURE");
|
var failureRegExp = new RegExp("^FAILURE");
|
||||||
var todoRegExp = new RegExp("^TODO");
|
|
||||||
|
|
||||||
const framePath = "/tests/dom/tests/mochitest/localstorage/";
|
const framePath = "/tests/dom/tests/mochitest/localstorage/";
|
||||||
|
|
||||||
@ -39,15 +40,14 @@ function onMessageReceived(event)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
testDone = true;
|
testDone = true;
|
||||||
SimpleTest.finish();
|
t.done();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Any other message indicates error, succes or todo message of a test
|
// Any other message indicates error, succes or todo message of a test
|
||||||
default:
|
default:
|
||||||
if (event.data.match(todoRegExp))
|
t.step(function() {
|
||||||
SimpleTest.todo(false, event.data);
|
assert_true(!event.data.match(failureRegExp), event.data);
|
||||||
else
|
});
|
||||||
SimpleTest.ok(!event.data.match(failureRegExp), event.data);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>localStorage equal origins</title>
|
<title>localStorage equal origins</title>
|
||||||
|
|
||||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script type="text/javascript" src="interOriginTest2.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
<script src="interOriginTest2.js"></script>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This test loads two frames from the same origin, clears in one frame,
|
This test loads two frames from the same origin, clears in one frame,
|
||||||
@ -22,8 +22,6 @@ function startTest()
|
|||||||
slaveFrame.location = slaveFrameOrigin + framePath + "frameKeySync.html?2";
|
slaveFrame.location = slaveFrameOrigin + framePath + "frameKeySync.html?2";
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleTest.waitForExplicitFinish();
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>localStorage different origins</title>
|
<title>localStorage different origins</title>
|
||||||
|
|
||||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script type="text/javascript" src="interOriginTest2.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
<script src="interOriginTest2.js"></script>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This test loads two frames from different
|
This test loads two frames from different
|
||||||
@ -30,8 +30,6 @@ function startTest()
|
|||||||
slaveFrame.location = slaveFrameOrigin + framePath + "frameSlaveNotEqual.html";
|
slaveFrame.location = slaveFrameOrigin + framePath + "frameSlaveNotEqual.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleTest.waitForExplicitFinish();
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>localStorage different domains</title>
|
<title>localStorage different domains</title>
|
||||||
|
|
||||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script type="text/javascript" src="interOriginTest2.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
<script src="interOriginTest2.js"></script>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This test loads two frames from different
|
This test loads two frames from different
|
||||||
@ -30,8 +30,6 @@ function startTest()
|
|||||||
slaveFrame.location = slaveFrameOrigin + framePath + "frameSlaveNotEqual.html";
|
slaveFrame.location = slaveFrameOrigin + framePath + "frameSlaveNotEqual.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleTest.waitForExplicitFinish();
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>localStorage equal origins</title>
|
<title>localStorage equal origins</title>
|
||||||
|
|
||||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script type="text/javascript" src="interOriginTest2.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
<script src="interOriginTest2.js"></script>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This test loads two frames from equal
|
This test loads two frames from equal
|
||||||
@ -31,8 +31,6 @@ function startTest()
|
|||||||
slaveFrame.location = slaveFrameOrigin + framePath + "frameSlaveEqual.html";
|
slaveFrame.location = slaveFrameOrigin + framePath + "frameSlaveEqual.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleTest.waitForExplicitFinish();
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>localStorage different port numbers</title>
|
<title>localStorage different port numbers</title>
|
||||||
|
|
||||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script type="text/javascript" src="interOriginTest2.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
<script src="interOriginTest2.js"></script>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This test loads two frames from different
|
This test loads two frames from different
|
||||||
@ -30,8 +30,6 @@ function startTest()
|
|||||||
slaveFrame.location = slaveFrameOrigin + framePath + "frameSlaveNotEqual.html";
|
slaveFrame.location = slaveFrameOrigin + framePath + "frameSlaveNotEqual.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleTest.waitForExplicitFinish();
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>localStorage different domains</title>
|
<title>localStorage different domains</title>
|
||||||
|
|
||||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script type="text/javascript" src="interOriginTest2.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
<script src="interOriginTest2.js"></script>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This test loads two frames from different
|
This test loads two frames from different
|
||||||
@ -30,8 +30,6 @@ function startTest()
|
|||||||
slaveFrame.location = slaveFrameOrigin + framePath + "frameSlaveNotEqual.html";
|
slaveFrame.location = slaveFrameOrigin + framePath + "frameSlaveNotEqual.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleTest.waitForExplicitFinish();
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title>localStorage different port numbers</title>
|
<title>Storage interface</title>
|
||||||
|
|
||||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||||
<script type="text/javascript" src="interOriginTest2.js"></script>
|
|
||||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
Loading…
Reference in New Issue
Block a user