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

Side by Side Diff: components/test_runner/test_runner.h

Issue 1715573002: Replicating LayoutDumpFlags across OOPIFs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replicating-pixel-dump-flag
Patch Set: Rebasing... Created 4 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_
6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ 6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 bool UseMockTheme() const { return use_mock_theme_; } 67 bool UseMockTheme() const { return use_mock_theme_; }
68 68
69 void InvokeCallback(scoped_ptr<InvokeCallbackTask> callback); 69 void InvokeCallback(scoped_ptr<InvokeCallbackTask> callback);
70 70
71 // WebTestRunner implementation. 71 // WebTestRunner implementation.
72 bool ShouldGeneratePixelResults() override; 72 bool ShouldGeneratePixelResults() override;
73 bool ShouldStayOnPageAfterHandlingBeforeUnload() const override; 73 bool ShouldStayOnPageAfterHandlingBeforeUnload() const override;
74 bool ShouldDumpAsAudio() const override; 74 bool ShouldDumpAsAudio() const override;
75 void GetAudioData(std::vector<unsigned char>* buffer_view) const override; 75 void GetAudioData(std::vector<unsigned char>* buffer_view) const override;
76 const LayoutDumpFlags& GetLayoutDumpFlags() override; 76 const LayoutDumpFlags& GetLayoutDumpFlags() override;
77 void ReplicateLayoutDumpFlagsChanges(
78 const base::DictionaryValue& changed_values) override;
77 bool HasCustomTextDump(std::string* custom_text_dump) const override; 79 bool HasCustomTextDump(std::string* custom_text_dump) const override;
78 bool ShouldDumpBackForwardList() const override; 80 bool ShouldDumpBackForwardList() const override;
79 blink::WebContentSettingsClient* GetWebContentSettings() const override; 81 blink::WebContentSettingsClient* GetWebContentSettings() const override;
80 82
81 // Methods used by WebTestProxyBase. 83 // Methods used by WebTestProxyBase.
82 bool shouldDumpSelectionRect() const; 84 bool shouldDumpSelectionRect() const;
83 bool isPrinting() const; 85 bool isPrinting() const;
84 bool shouldDumpAsTextWithPixelResults(); 86 bool shouldDumpAsTextWithPixelResults();
85 bool shouldDumpAsCustomText() const; 87 bool shouldDumpAsCustomText() const;
86 std:: string customDumpText() const; 88 std:: string customDumpText() const;
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 void CapturePixelsAsyncThen(v8::Local<v8::Function> callback); 616 void CapturePixelsAsyncThen(v8::Local<v8::Function> callback);
615 // Similar to CapturePixelsAsyncThen(). Copies to the clipboard the image 617 // Similar to CapturePixelsAsyncThen(). Copies to the clipboard the image
616 // located at a particular point in the WebView (if there is such an image), 618 // located at a particular point in the WebView (if there is such an image),
617 // reads back its pixels, and provides the snapshot to the callback. If there 619 // reads back its pixels, and provides the snapshot to the callback. If there
618 // is no image at that point, calls the callback with (0, 0, empty_snapshot). 620 // is no image at that point, calls the callback with (0, 0, empty_snapshot).
619 void CopyImageAtAndCapturePixelsAsyncThen( 621 void CopyImageAtAndCapturePixelsAsyncThen(
620 int x, int y, const v8::Local<v8::Function> callback); 622 int x, int y, const v8::Local<v8::Function> callback);
621 623
622 void GetManifestThen(v8::Local<v8::Function> callback); 624 void GetManifestThen(v8::Local<v8::Function> callback);
623 625
626 // Takes care of notifying the delegate after a change to layout dump flags.
627 void OnLayoutDumpFlagsChanged();
628
624 /////////////////////////////////////////////////////////////////////////// 629 ///////////////////////////////////////////////////////////////////////////
625 // Internal helpers 630 // Internal helpers
626 631
627 void GetManifestCallback(scoped_ptr<InvokeCallbackTask> task, 632 void GetManifestCallback(scoped_ptr<InvokeCallbackTask> task,
628 const blink::WebURLResponse& response, 633 const blink::WebURLResponse& response,
629 const std::string& data); 634 const std::string& data);
630 void CapturePixelsCallback(scoped_ptr<InvokeCallbackTask> task, 635 void CapturePixelsCallback(scoped_ptr<InvokeCallbackTask> task,
631 const SkBitmap& snapshot); 636 const SkBitmap& snapshot);
632 void DispatchBeforeInstallPromptCallback(scoped_ptr<InvokeCallbackTask> task, 637 void DispatchBeforeInstallPromptCallback(scoped_ptr<InvokeCallbackTask> task,
633 bool canceled); 638 bool canceled);
(...skipping 19 matching lines...) Expand all
653 // Sets a flag causing the next call to DrawingBuffer::create to fail. 658 // Sets a flag causing the next call to DrawingBuffer::create to fail.
654 void ForceNextDrawingBufferCreationToFail(); 659 void ForceNextDrawingBufferCreationToFail();
655 660
656 bool test_is_running_; 661 bool test_is_running_;
657 662
658 // When reset is called, go through and close all but the main test shell 663 // When reset is called, go through and close all but the main test shell
659 // window. By default, set to true but toggled to false using 664 // window. By default, set to true but toggled to false using
660 // setCloseRemainingWindowsWhenComplete(). 665 // setCloseRemainingWindowsWhenComplete().
661 bool close_remaining_windows_; 666 bool close_remaining_windows_;
662 667
663 // If true, don't dump output until notifyDone is called.
664 bool wait_until_done_;
665
666 // If true, ends the test when a URL is loaded externally via 668 // If true, ends the test when a URL is loaded externally via
667 // WebFrameClient::loadURLExternally(). 669 // WebFrameClient::loadURLExternally().
668 bool wait_until_external_url_load_; 670 bool wait_until_external_url_load_;
669 671
670 // Causes navigation actions just printout the intended navigation instead 672 // Causes navigation actions just printout the intended navigation instead
671 // of taking you to the page. This is used for cases like mailto, where you 673 // of taking you to the page. This is used for cases like mailto, where you
672 // don't actually want to open the mail program. 674 // don't actually want to open the mail program.
673 bool policy_delegate_enabled_; 675 bool policy_delegate_enabled_;
674 676
675 // Toggles the behavior of the policy delegate. If true, then navigations 677 // Toggles the behavior of the policy delegate. If true, then navigations
(...skipping 20 matching lines...) Expand all
696 // Bound variable counting the number of top URLs visited. 698 // Bound variable counting the number of top URLs visited.
697 int web_history_item_count_; 699 int web_history_item_count_;
698 700
699 // Bound variable to set whether postMessages should be intercepted or not 701 // Bound variable to set whether postMessages should be intercepted or not
700 bool intercept_post_message_; 702 bool intercept_post_message_;
701 703
702 // If true, the test_shell will write a descriptive line for each editing 704 // If true, the test_shell will write a descriptive line for each editing
703 // command. 705 // command.
704 bool dump_editting_callbacks_; 706 bool dump_editting_callbacks_;
705 707
706 // If true, the test_shell will generate pixel results in DumpAsText mode
707 bool generate_pixel_results_;
708
709 // Flags controlling what content gets dumped as a layout text result. 708 // Flags controlling what content gets dumped as a layout text result.
710 LayoutDumpFlags layout_dump_flags_; 709 LayoutDumpFlags layout_dump_flags_;
711 710
712 // If true, the test_shell will print out the icon change notifications. 711 // If true, the test_shell will print out the icon change notifications.
713 bool dump_icon_changes_; 712 bool dump_icon_changes_;
714 713
715 // If true, the test_shell will output a base64 encoded WAVE file. 714 // If true, the test_shell will output a base64 encoded WAVE file.
716 bool dump_as_audio_; 715 bool dump_as_audio_;
717 716
718 // If true, the test_shell will output a descriptive line for each frame 717 // If true, the test_shell will output a descriptive line for each frame
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 bool use_mock_theme_; 818 bool use_mock_theme_;
820 819
821 base::WeakPtrFactory<TestRunner> weak_factory_; 820 base::WeakPtrFactory<TestRunner> weak_factory_;
822 821
823 DISALLOW_COPY_AND_ASSIGN(TestRunner); 822 DISALLOW_COPY_AND_ASSIGN(TestRunner);
824 }; 823 };
825 824
826 } // namespace test_runner 825 } // namespace test_runner
827 826
828 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ 827 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698