Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/release-note.js

Issue 2742623002: DevTools: improve test infrastructure w/ devtools driving the test (Closed)
Patch Set: fixup Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 TestRunner.addResult("Test release note\n");
5
6 Help.releaseNoteText = [
7 {
8 version: 99,
9 highlights: [
10 {
11 contents: [
12 {
13 text: 'Improved',
14 },
15 {
16 text: 'Performance and Memory panels',
17 link: 'https://developers.google.com/web/tools/chrome-devtools/',
18 }
19 ],
20 featured: true,
21 },
22 {
23 contents: [
24 {
25 text: 'Edit cookies directly',
26 link: 'https://developers.google.com/web/tools/chrome-devtools/',
27 },
28 {
29 text: 'from the Application panel',
30 },
31 ],
32 },
33 ],
34 link: 'https://developers.google.com/web/tools/chrome-devtools/',
35 image: {
36 src: './resources/test.png',
37 },
38 },
39 ];
40
41 TestRunner.addSniffer(UI.inspectorView, "showPanel", onPanelShown);
42
43 TestRunner.addResult(`Browser version: ${Help.browserVersion()}\n`);
44 Help.showReleaseNoteIfNeeded();
45
46 function onPanelShown(viewId, panelPromise) {
47 panelPromise.then(() => {
48 var releaseNoteView = UI.viewManager.view("release-note");
49 var releaseNoteElement = releaseNoteView[UI.View._widgetSymbol].contentEleme nt;
50 TestRunner.addResult("Dumping release note text:");
51 TestRunner.addResult(releaseNoteElement.innerText);
52 TestRunner.addResult("Last version of release note seen should be updated:") ;
53 TestRunner.addResult(Help.releaseNoteVersionSetting().get() + "\n");
54
55 TestRunner.addSniffer(UI.InspectorView.prototype, "closeDrawerTab", onClose) ;
56 TestRunner.addResult("Click on hide button");
57 var closeButton = releaseNoteElement.querySelector(".close-release-note");
58 closeButton.click();
59 });
60 }
61
62 function onClose(view) {
63 TestRunner.addResult(`Hiding view: ${view}`);
64 TestRunner.completeTest();
65 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698