// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <cstdio> #include <fstream> #include <iostream> #include <sstream> #include <string> #include "testing/gtest/include/gtest/gtest.h" namespace { // Path to the test app used to locate sample app. std::string s_test_app_path; // Returns directory name with trailing separator extracted from the file path. std::string DirName(const std::string& file_path) { … } // Runs |command_line| and returns string representation of its stdout. std::string RunCommand(std::string command_line) { … } // Test that cronet_sample runs and gets connection refused from localhost. TEST(SampleTest, TestConnectionRefused) { … } } // namespace int main(int argc, char** argv) { … }