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

Side by Side Diff: content/public/test/test_web_ui.cc

Issue 2269963003: Site Settings Desktop: Fix bug with deleting manually added exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test Created 4 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "content/public/browser/web_ui_message_handler.h" 6 #include "content/public/browser/web_ui_message_handler.h"
7 #include "content/public/test/test_web_ui.h" 7 #include "content/public/test/test_web_ui.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 call_data_.back()->TakeAsArg1(arg1.DeepCopy()); 81 call_data_.back()->TakeAsArg1(arg1.DeepCopy());
82 call_data_.back()->TakeAsArg2(arg2.DeepCopy()); 82 call_data_.back()->TakeAsArg2(arg2.DeepCopy());
83 call_data_.back()->TakeAsArg3(arg3.DeepCopy()); 83 call_data_.back()->TakeAsArg3(arg3.DeepCopy());
84 } 84 }
85 85
86 void TestWebUI::CallJavascriptFunctionUnsafe(const std::string& function_name, 86 void TestWebUI::CallJavascriptFunctionUnsafe(const std::string& function_name,
87 const base::Value& arg1, 87 const base::Value& arg1,
88 const base::Value& arg2, 88 const base::Value& arg2,
89 const base::Value& arg3, 89 const base::Value& arg3,
90 const base::Value& arg4) { 90 const base::Value& arg4) {
91 NOTREACHED(); 91 call_data_.push_back(new CallData(function_name));
92 call_data_.back()->TakeAsArg1(arg1.DeepCopy());
93 call_data_.back()->TakeAsArg2(arg2.DeepCopy());
94 call_data_.back()->TakeAsArg3(arg3.DeepCopy());
95 call_data_.back()->TakeAsArg4(arg4.DeepCopy());
92 } 96 }
93 97
94 void TestWebUI::CallJavascriptFunctionUnsafe( 98 void TestWebUI::CallJavascriptFunctionUnsafe(
95 const std::string& function_name, 99 const std::string& function_name,
96 const std::vector<const base::Value*>& args) { 100 const std::vector<const base::Value*>& args) {
97 NOTREACHED(); 101 NOTREACHED();
98 } 102 }
99 103
100 ScopedVector<WebUIMessageHandler>* TestWebUI::GetHandlersForTesting() { 104 ScopedVector<WebUIMessageHandler>* TestWebUI::GetHandlersForTesting() {
101 return &handlers_; 105 return &handlers_;
(...skipping 11 matching lines...) Expand all
113 } 117 }
114 118
115 void TestWebUI::CallData::TakeAsArg2(base::Value* arg) { 119 void TestWebUI::CallData::TakeAsArg2(base::Value* arg) {
116 arg2_.reset(arg); 120 arg2_.reset(arg);
117 } 121 }
118 122
119 void TestWebUI::CallData::TakeAsArg3(base::Value* arg) { 123 void TestWebUI::CallData::TakeAsArg3(base::Value* arg) {
120 arg3_.reset(arg); 124 arg3_.reset(arg);
121 } 125 }
122 126
127 void TestWebUI::CallData::TakeAsArg4(base::Value* arg) {
128 arg4_.reset(arg);
129 }
130
123 } // namespace content 131 } // namespace content
OLDNEW
« content/public/test/test_web_ui.h ('K') | « content/public/test/test_web_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698