| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h" | 10 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/test/base/in_process_browser_test.h" | 13 #include "chrome/test/base/in_process_browser_test.h" |
| 14 #include "chrome/test/base/ui_test_utils.h" | 14 #include "chrome/test/base/ui_test_utils.h" |
| 15 #include "net/test/test_server.h" | 15 #include "net/test/test_server.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 | 17 |
| 18 namespace gdata { |
| 19 |
| 18 namespace { | 20 namespace { |
| 19 | 21 |
| 20 class GDataTest : public InProcessBrowserTest { | 22 class GDataTest : public InProcessBrowserTest { |
| 21 public: | 23 public: |
| 22 GDataTest() | 24 GDataTest() |
| 23 : InProcessBrowserTest(), | 25 : InProcessBrowserTest(), |
| 24 gdata_test_server_(net::TestServer::TYPE_GDATA, | 26 gdata_test_server_(net::TestServer::TYPE_GDATA, |
| 25 net::TestServer::kLocalhost, | 27 net::TestServer::kLocalhost, |
| 26 FilePath(FILE_PATH_LITERAL("chrome/test/data"))) { | 28 FilePath(FILE_PATH_LITERAL("chrome/test/data"))) { |
| 27 } | 29 } |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 gdata_test_server_.GetURL("files/chromeos/gdata/testfile.txt"), | 139 gdata_test_server_.GetURL("files/chromeos/gdata/testfile.txt"), |
| 138 0, // start_changestamp | 140 0, // start_changestamp |
| 139 std::string(), // search string | 141 std::string(), // search string |
| 140 std::string(), // directory resource ID | 142 std::string(), // directory resource ID |
| 141 base::Bind(&TestGetDocumentsCallback, &result, &result_data)); | 143 base::Bind(&TestGetDocumentsCallback, &result, &result_data)); |
| 142 ui_test_utils::RunMessageLoop(); | 144 ui_test_utils::RunMessageLoop(); |
| 143 | 145 |
| 144 EXPECT_EQ(gdata::GDATA_PARSE_ERROR, result); | 146 EXPECT_EQ(gdata::GDATA_PARSE_ERROR, result); |
| 145 EXPECT_FALSE(result_data); | 147 EXPECT_FALSE(result_data); |
| 146 } | 148 } |
| 149 |
| 150 } // namespace gdata |
| OLD | NEW |