summaryrefslogtreecommitdiff
path: root/content/browser/download/base_file_unittest.cc
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-06-11 10:57:03 +0100
committerTorne (Richard Coles) <torne@google.com>2013-06-11 10:57:03 +0100
commit868fa2fe829687343ffae624259930155e16dbd8 (patch)
tree54d316199dd9739c57c3aacd131853bbd6554a94 /content/browser/download/base_file_unittest.cc
parentbb1bdbd796f966b5bf11f40ecbea12621c7bfac9 (diff)
downloadchromium_org-868fa2fe829687343ffae624259930155e16dbd8.tar.gz
Merge from Chromium at DEPS revision r205460
This commit was generated by merge_to_master.py. Change-Id: I4a744a5e426bd3bb378d887cfa56fe054742a540
Diffstat (limited to 'content/browser/download/base_file_unittest.cc')
-rw-r--r--content/browser/download/base_file_unittest.cc42
1 files changed, 1 insertions, 41 deletions
diff --git a/content/browser/download/base_file_unittest.cc b/content/browser/download/base_file_unittest.cc
index 7b53c4dbd2..dab5cc2dd6 100644
--- a/content/browser/download/base_file_unittest.cc
+++ b/content/browser/download/base_file_unittest.cc
@@ -8,7 +8,7 @@
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
#include "base/message_loop.h"
-#include "base/string_number_conversions.h"
+#include "base/strings/string_number_conversions.h"
#include "base/test/test_file_util.h"
#include "content/browser/browser_thread_impl.h"
#include "content/public/browser/download_interrupt_reasons.h"
@@ -612,46 +612,6 @@ TEST_F(BaseFileTest, IsEmptyHash) {
EXPECT_FALSE(BaseFile::IsEmptyHash(std::string()));
}
-// Test that calculating speed after no writes.
-TEST_F(BaseFileTest, SpeedWithoutWrite) {
- ASSERT_TRUE(InitializeFile());
- base::TimeTicks current = StartTick() + kElapsedTimeDelta;
- ASSERT_EQ(0, CurrentSpeedAtTime(current));
- base_file_->Finish();
-}
-
-// Test that calculating speed after a single write.
-TEST_F(BaseFileTest, SpeedAfterSingleWrite) {
- ASSERT_TRUE(InitializeFile());
- ASSERT_TRUE(AppendDataToFile(kTestData1));
- base::TimeTicks current = StartTick() + kElapsedTimeDelta;
- int64 expected_speed = kTestDataLength1 / kElapsedTimeSeconds;
- ASSERT_EQ(expected_speed, CurrentSpeedAtTime(current));
- base_file_->Finish();
-}
-
-// Test that calculating speed after a multiple writes.
-TEST_F(BaseFileTest, SpeedAfterMultipleWrite) {
- ASSERT_TRUE(InitializeFile());
- ASSERT_TRUE(AppendDataToFile(kTestData1));
- ASSERT_TRUE(AppendDataToFile(kTestData2));
- ASSERT_TRUE(AppendDataToFile(kTestData3));
- ASSERT_TRUE(AppendDataToFile(kTestData4));
- base::TimeTicks current = StartTick() + kElapsedTimeDelta;
- int64 expected_speed = (kTestDataLength1 + kTestDataLength2 +
- kTestDataLength3 + kTestDataLength4) / kElapsedTimeSeconds;
- ASSERT_EQ(expected_speed, CurrentSpeedAtTime(current));
- base_file_->Finish();
-}
-
-// Test that calculating speed after no delay - should not divide by 0.
-TEST_F(BaseFileTest, SpeedAfterNoElapsedTime) {
- ASSERT_TRUE(InitializeFile());
- ASSERT_TRUE(AppendDataToFile(kTestData1));
- ASSERT_EQ(0, CurrentSpeedAtTime(StartTick()));
- base_file_->Finish();
-}
-
// Test that a temporary file is created in the default download directory.
TEST_F(BaseFileTest, CreatedInDefaultDirectory) {
ASSERT_TRUE(base_file_->full_path().empty());