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

Unified Diff: net/disk_cache/simple/simple_index_file_unittest.cc

Issue 2109503009: Refactor net tests to use GMock matchers for checking net::Error results (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert changes to contents.txt files Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/entry_unittest.cc ('k') | net/dns/dns_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_index_file_unittest.cc
diff --git a/net/disk_cache/simple/simple_index_file_unittest.cc b/net/disk_cache/simple/simple_index_file_unittest.cc
index 187ef7796a3d4a8aad020659e0e9614ca5d2575e..7d3f8b90c28d7fa6013d09e28b25ba8d71d6b951 100644
--- a/net/disk_cache/simple/simple_index_file_unittest.cc
+++ b/net/disk_cache/simple/simple_index_file_unittest.cc
@@ -28,8 +28,12 @@
#include "net/disk_cache/simple/simple_index.h"
#include "net/disk_cache/simple/simple_util.h"
#include "net/disk_cache/simple/simple_version_upgrade.h"
+#include "net/test/gtest_util.h"
+#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+using net::test::IsOk;
+
using base::Time;
using disk_cache::SimpleIndexFile;
using disk_cache::SimpleIndex;
@@ -333,9 +337,9 @@ TEST_F(SimpleIndexFileTest, SimpleCacheUpgrade) {
cache_thread.task_runner().get(), NULL);
net::TestCompletionCallback cb;
int rv = simple_cache->Init(cb.callback());
- EXPECT_EQ(net::OK, cb.GetResult(rv));
+ EXPECT_THAT(cb.GetResult(rv), IsOk());
rv = simple_cache->index()->ExecuteWhenReady(cb.callback());
- EXPECT_EQ(net::OK, cb.GetResult(rv));
+ EXPECT_THAT(cb.GetResult(rv), IsOk());
delete simple_cache;
// The backend flushes the index on destruction and does so on the cache
« no previous file with comments | « net/disk_cache/entry_unittest.cc ('k') | net/dns/dns_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698