blob: 97f6dfe1fd0be6c82e88e85068db76b2a0da5728 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include "chrome/browser/sync/util/get_session_name_task.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace browser_sync {
typedef testing::Test SyncGetSessionNameTaskTest;
#if defined(OS_WIN)
// The test is somewhat silly, and just verifies that we return a computer name.
TEST_F(SyncGetSessionNameTaskTest, GetComputerName) {
std::string computer_name = GetSessionNameTask::GetComputerName();
EXPECT_TRUE(!computer_name.empty());
}
#endif
#if defined(OS_MACOSX)
// The test is somewhat silly, and just verifies that we return a hardware
// model name.
TEST_F(SyncGetSessionNameTaskTest, GetHardwareModelName) {
std::string hardware_model = GetSessionNameTask::GetHardwareModelName();
EXPECT_TRUE(!hardware_model.empty());
}
#endif
}
|