[WK2] selection does not disappear after coping the text
[framework/web/webkit-efl.git] / LayoutTests / inspector / tabbed-editors-history.html
1 <html>
2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script type="text/javascript">
5 var test = function()
6 {
7     function dumpHistory(history)
8     {
9         InspectorTest.addResult("  history = [" + String(history._urls) + "]");
10     }
11
12     function updateAndDump(history, urls)
13     {
14         history.update(urls);
15         dumpHistory(history);
16     }
17
18     function removeAndDump(history, url)
19     {
20         history.remove(url);
21         dumpHistory(history);
22     }
23
24     function url(index)
25     {
26         return "url_" + index;
27     }
28
29     var history = new WebInspector.TabbedEditorContainer.History([]);
30
31     dumpHistory(history);
32     // Emulate opening of several tabs.
33     updateAndDump(history, [url(1)]);
34     updateAndDump(history, [url(2), url(1)]);
35     updateAndDump(history, [url(3), url(2), url(1)]);
36     // Emulate switching between tabs.
37     updateAndDump(history, [url(2), url(3), url(1)]);
38     updateAndDump(history, [url(1), url(2), url(3)]);
39     // Emulate opening of several tabs from another page.
40     updateAndDump(history, [url(11)]);
41     updateAndDump(history, [url(12), url(11)]);
42     updateAndDump(history, [url(13), url(12), url(11)]);
43     // ... and switching between them.
44     updateAndDump(history, [url(12), url(13), url(11)]);
45     updateAndDump(history, [url(11), url(12), url(13)]);
46     // Now close some tabs.
47     removeAndDump(history, url(11));
48     removeAndDump(history, url(13));
49     // Now open some other instead of them.
50     updateAndDump(history, [url(14), url(12)]);
51     updateAndDump(history, [url(15), url(14), url(12)]);
52     updateAndDump(history, [url(16), url(15), url(14), url(12)]);
53     // Close all of them one by one.
54     removeAndDump(history, url(16));
55     removeAndDump(history, url(15));
56     removeAndDump(history, url(14));
57     removeAndDump(history, url(12));
58     removeAndDump(history, url(1));
59     removeAndDump(history, url(2));
60     removeAndDump(history, url(3));
61
62     InspectorTest.completeTest();
63 }
64 </script>
65 </head>
66 <body onload="runTest()">
67 <p>Tests history saving logic in TabbedEditorContainer.</p>
68 <a href="https://bugs.webkit.org/show_bug.cgi?id=76912">Bug 76912</a>
69 </body>
70 </html>