author Francois Marier <>
Fri, 07 Sep 2018 20:31:18 +0000
changeset 492412 f7a8a2d68c01f5e71f6051406240766e9542f1da
parent 236951 e3e717e9b62827b16b236fa67bcdce7f6065a89e
child 497594 58adc643dcdc20eccb4d30bc454b50420e96c020
permissions -rw-r--r--
Bug 1489590 - Teach the URL classifier about the FastBlock lists. r=dimi a=pascalc Differential Revision:

  <title>Test for Bug 580069</title>
  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<a target="_blank" href="">Mozilla Bug 580069</a>

<iframe id='iframe' src='file_bug580069_1.html'></iframe>

<script type="application/javascript">


var iframe = document.getElementById('iframe');
var iframeCw = iframe.contentWindow;

// Called when file_bug580069_1.html loads.
function page1Load() {
  // This should cause us to load file 2.

// Called when file_bug580069_2.html loads.
var page2Loads = 0;
function page2Load(method) {

  dump("iframe's location is: " + iframeCw.location + ", method is " + method + "\n");

  if (page2Loads == 0) {
    is(method, "POST", "Method for first load should be POST.");
    iframeCw.history.replaceState('', '', '?replaced');

    // This refresh shouldn't pop up the "are you sure you want to refresh a page
    // with POST data?" dialog.  If it does, this test will hang and fail, and
    // we'll see 'Refreshing iframe...' at the end of the test log.
    dump('Refreshing iframe...\n');
  else if (page2Loads == 1) {
    is(method, "GET", "Method for second load should be GET.");
    is(, "?replaced", "Wrong search on iframe after refresh.");
  else {
    ok(false, "page2Load should only be called twice.");