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

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

Issue 1989103007: Test for form submission targeting remote frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing unnecessary logging statements. Created 4 years, 7 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 #include "components/test_runner/test_runner.h" 5 #include "components/test_runner/test_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 1920
1921 bool Run(WebTestDelegate* delegate, WebView*) override { 1921 bool Run(WebTestDelegate* delegate, WebView*) override {
1922 delegate->GoToOffset(distance_); 1922 delegate->GoToOffset(distance_);
1923 return true; // FIXME: Did it really start a navigation? 1923 return true; // FIXME: Did it really start a navigation?
1924 } 1924 }
1925 1925
1926 private: 1926 private:
1927 int distance_; 1927 int distance_;
1928 }; 1928 };
1929 1929
1930 void TestRunner::NotifyDone() {
1931 // Test didn't timeout. Kill the pending callbacks.
1932 weak_factory_.InvalidateWeakPtrs();
1933
1934 CompleteNotifyDone();
1935 }
1936
1937 void TestRunner::WaitUntilDone() { 1930 void TestRunner::WaitUntilDone() {
1938 layout_test_runtime_flags_.set_wait_until_done(true); 1931 layout_test_runtime_flags_.set_wait_until_done(true);
1939 OnLayoutTestRuntimeFlagsChanged(); 1932 OnLayoutTestRuntimeFlagsChanged();
1940 } 1933 }
1941 1934
1942 void TestRunner::QueueBackNavigation(int how_far_back) { 1935 void TestRunner::QueueBackNavigation(int how_far_back) {
1943 work_queue_.AddWork(new WorkItemBackForward(-how_far_back)); 1936 work_queue_.AddWork(new WorkItemBackForward(-how_far_back));
1944 } 1937 }
1945 1938
1946 void TestRunner::QueueForwardNavigation(int how_far_forward) { 1939 void TestRunner::QueueForwardNavigation(int how_far_forward) {
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
2709 2702
2710 std::string mimeType = data_source->response().mimeType().utf8(); 2703 std::string mimeType = data_source->response().mimeType().utf8();
2711 if (mimeType != "text/plain") 2704 if (mimeType != "text/plain")
2712 return; 2705 return;
2713 2706
2714 layout_test_runtime_flags_.set_dump_as_text(true); 2707 layout_test_runtime_flags_.set_dump_as_text(true);
2715 layout_test_runtime_flags_.set_generate_pixel_results(false); 2708 layout_test_runtime_flags_.set_generate_pixel_results(false);
2716 OnLayoutTestRuntimeFlagsChanged(); 2709 OnLayoutTestRuntimeFlagsChanged();
2717 } 2710 }
2718 2711
2719 void TestRunner::CompleteNotifyDone() { 2712 void TestRunner::NotifyDone() {
2720 if (layout_test_runtime_flags_.wait_until_done() && !topLoadingFrame() && 2713 if (layout_test_runtime_flags_.wait_until_done() && !topLoadingFrame() &&
2721 work_queue_.is_empty()) 2714 work_queue_.is_empty())
2722 delegate_->TestFinished(); 2715 delegate_->TestFinished();
2723 layout_test_runtime_flags_.set_wait_until_done(false); 2716 layout_test_runtime_flags_.set_wait_until_done(false);
2724 OnLayoutTestRuntimeFlagsChanged(); 2717 OnLayoutTestRuntimeFlagsChanged();
2725 } 2718 }
2726 2719
2727 } // namespace test_runner 2720 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/test_runner.h ('k') | third_party/WebKit/LayoutTests/FlagExpectations/site-per-process » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698