- add sources.
[platform/framework/web/crosswalk.git] / src / cloud_print / gcp20 / prototype / printer_unittest.cc
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "cloud_print/gcp20/prototype/printer.h"
6
7 #include "base/basictypes.h"
8 #include "base/json/json_reader.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/values.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12
13 TEST(Printer, ValidateCapabilities) {
14   int error_code;
15   std::string error_msg;
16   scoped_ptr<base::Value> value(
17       base::JSONReader::ReadAndReturnError(Printer::GetRawCdd(), 0,
18                                            &error_code, &error_msg));
19   ASSERT_TRUE(!!value) << error_msg;
20
21   base::DictionaryValue* dictionary_value = NULL;
22   EXPECT_TRUE(value->GetAsDictionary(&dictionary_value)) << "Not a dictionary";
23 }
24