browser/devtools/sourceeditor/test/browser_editor_history.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 /* vim: set ts=2 et sw=2 tw=80: */
     2 /* Any copyright is dedicated to the Public Domain.
     3    http://creativecommons.org/publicdomain/zero/1.0/ */
     5 "use strict";
     7 function test() {
     8   waitForExplicitFinish();
     9   setup((ed, win) => {
    10     ok(ed.isClean(), "default isClean");
    11     ok(!ed.canUndo(), "default canUndo");
    12     ok(!ed.canRedo(), "default canRedo");
    14     ed.setText("Hello, World!");
    15     ok(!ed.isClean(), "isClean");
    16     ok(ed.canUndo(), "canUndo");
    17     ok(!ed.canRedo(), "canRedo");
    19     ed.undo();
    20     ok(ed.isClean(), "isClean after undo");
    21     ok(!ed.canUndo(), "canUndo after undo");
    22     ok(ed.canRedo(), "canRedo after undo");
    24     ed.setText("What's up?");
    25     ed.setClean();
    26     ok(ed.isClean(), "isClean after setClean");
    27     ok(ed.canUndo(), "canUndo after setClean");
    28     ok(!ed.canRedo(), "canRedo after setClean");
    30     teardown(ed, win);
    31   });
    32 }

mercurial