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

Side by Side Diff: extensions/browser/api/document_scan/document_scan_api_unittest.cc

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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 "extensions/browser/api/document_scan/document_scan_api.h" 5 #include "extensions/browser/api/document_scan/document_scan_api.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "extensions/browser/api/document_scan/mock_document_scan_interface.h" 10 #include "extensions/browser/api/document_scan/mock_document_scan_interface.h"
11 #include "extensions/browser/api_test_utils.h" 11 #include "extensions/browser/api_test_utils.h"
12 #include "extensions/browser/api_unittest.h" 12 #include "extensions/browser/api_unittest.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 using testing::_; 15 using testing::_;
16 16
17 namespace extensions { 17 namespace extensions {
18 18
19 namespace core_api { 19 namespace api {
20 20
21 // Tests of networking_private_crypto support for Networking Private API. 21 // Tests of networking_private_crypto support for Networking Private API.
22 class DocumentScanScanFunctionTest : public ApiUnitTest { 22 class DocumentScanScanFunctionTest : public ApiUnitTest {
23 public: 23 public:
24 DocumentScanScanFunctionTest() 24 DocumentScanScanFunctionTest()
25 : function_(new DocumentScanScanFunction()), 25 : function_(new DocumentScanScanFunction()),
26 document_scan_interface_(new MockDocumentScanInterface()) {} 26 document_scan_interface_(new MockDocumentScanInterface()) {}
27 ~DocumentScanScanFunctionTest() override {} 27 ~DocumentScanScanFunctionTest() override {}
28 28
29 void SetUp() override { 29 void SetUp() override {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 function_->set_user_gesture(true); 108 function_->set_user_gesture(true);
109 scoped_ptr<base::DictionaryValue> result( 109 scoped_ptr<base::DictionaryValue> result(
110 RunFunctionAndReturnDictionary(function_, "[{}]")); 110 RunFunctionAndReturnDictionary(function_, "[{}]"));
111 ASSERT_NE(nullptr, result.get()); 111 ASSERT_NE(nullptr, result.get());
112 document_scan::ScanResults scan_results; 112 document_scan::ScanResults scan_results;
113 EXPECT_TRUE(document_scan::ScanResults::Populate(*result, &scan_results)); 113 EXPECT_TRUE(document_scan::ScanResults::Populate(*result, &scan_results));
114 EXPECT_THAT(scan_results.data_urls, testing::ElementsAre(kScanData)); 114 EXPECT_THAT(scan_results.data_urls, testing::ElementsAre(kScanData));
115 EXPECT_EQ(kMimeType, scan_results.mime_type); 115 EXPECT_EQ(kMimeType, scan_results.mime_type);
116 } 116 }
117 117
118 } // namespace core_api 118 } // namespace api
119 119
120 } // namespace extensions 120 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698