| Index: components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_ui_manager_unittest.cc
|
| diff --git a/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_ui_manager_unittest.cc b/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_ui_manager_unittest.cc
|
| index fbe8af7fbd45ff814361a9b122a7aabf31998649..696703c83524cb448a2f1e83cd30730b827d6234 100644
|
| --- a/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_ui_manager_unittest.cc
|
| +++ b/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_ui_manager_unittest.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_ui_manager.h"
|
|
|
| +#include <vector>
|
| +
|
| #include "base/bind.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| @@ -31,8 +33,10 @@ class TestDataReductionProxyDebugUIManager
|
| public:
|
| TestDataReductionProxyDebugUIManager(
|
| const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner,
|
| - const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner)
|
| - : DataReductionProxyDebugUIManager(ui_task_runner, io_task_runner) {
|
| + const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
|
| + const std::string& app_locale)
|
| + : DataReductionProxyDebugUIManager(
|
| + ui_task_runner, io_task_runner, app_locale) {
|
| }
|
|
|
| ~TestDataReductionProxyDebugUIManager() override {
|
| @@ -42,6 +46,12 @@ class TestDataReductionProxyDebugUIManager
|
| return is_tab_closed_return_value_;
|
| }
|
|
|
| + void ShowBlockingPage(const BypassResource& resource) override {
|
| + std::vector<BypassResource> resources;
|
| + resources.push_back(resource);
|
| + OnBlockingPageDone(resources, true);
|
| + }
|
| +
|
| bool is_tab_closed_return_value_;
|
|
|
| private:
|
| @@ -58,7 +68,8 @@ class DataReductionProxyDebugUIManagerTest
|
| content::BrowserThread::GetMessageLoopProxyForThread(
|
| content::BrowserThread::UI),
|
| content::BrowserThread::GetMessageLoopProxyForThread(
|
| - content::BrowserThread::UI));
|
| + content::BrowserThread::UI),
|
| + std::string());
|
| }
|
|
|
| void OnBlockingPageDoneCallback(bool proceed) {
|
| @@ -145,11 +156,13 @@ TEST_F(DataReductionProxyDebugUIManagerTest, OnBlockingPageDone) {
|
| base::Unretained(this));
|
| resource.render_process_host_id = 0;
|
| resource.render_view_id = 0;
|
| + std::vector<DataReductionProxyDebugUIManager::BypassResource> resources;
|
| + resources.push_back(resource);
|
|
|
| content::BrowserThread::PostTask(
|
| content::BrowserThread::UI, FROM_HERE,
|
| base::Bind(&DataReductionProxyDebugUIManager::OnBlockingPageDone,
|
| - ui_manager_, resource, false));
|
| + ui_manager_, resources, false));
|
| base::RunLoop().RunUntilIdle();
|
| EXPECT_EQ(DONT_PROCEED, state_);
|
|
|
| @@ -157,7 +170,7 @@ TEST_F(DataReductionProxyDebugUIManagerTest, OnBlockingPageDone) {
|
| content::BrowserThread::PostTask(
|
| content::BrowserThread::UI, FROM_HERE,
|
| base::Bind(&DataReductionProxyDebugUIManager::OnBlockingPageDone,
|
| - ui_manager_, resource, true));
|
| + ui_manager_, resources, true));
|
| base::RunLoop().RunUntilIdle();
|
| EXPECT_EQ(PROCEED, state_);
|
| }
|
|
|